<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@include file="../common/taglib.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <title>jb-aptech毕业设计项目</title>
    <link href="${basePath}/css/style.css" rel="stylesheet" type="text/css">
    <script src="${basePath}/script/common.js"></script>
    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
    <script type="text/javascript">
        function to_page(pNum) {
            //http:// localhost:8080/sale/template?pNum=6
            $.ajax({
                type: "POST",
                url: "${basePath}/sale/template",
                data: "pNum="+pNum,
                success: function(msg){
                    //alert( "Data Saved: " + msg );
                    console.log(msg)
                    $("#saleBody").html(msg);

                }
            });
        }

    </script>
</head>
<body>

<div class="page_title">销售机会管理</div>
<div class="button_bar">
    <button class="common_button" onclick="help('');">帮助</button>
    <button class="common_button" onclick="to('add.html');">新建</button>
    <button class="common_button" onclick="reload();">查询</button>
</div>
<table class="query_form_table">
    <tr>
        <th>客户名称</th>
        <td><input /></td>
        <th>概要</th>
        <td><input /></td>
        <th>联系人</th>
        <td>
            <input name="T1" size="20" />
        </td>
    </tr>
</table>
<br />
<table class="data_list_table">
    <thead>
    <tr>
        <th>编号</th>
        <th>客户名称</th>
        <th style="width: 133px">概要</th>
        <th>联系人</th>
        <th>联系人电话</th>
        <th>创建时间</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody id="saleBody">
    <c:forEach items="${salChanceList}" var="salChance">
    <tr>

        <td class="list_data_number">${salChance.chcId}</td>
        <td class="list_data_text">${salChance.chcCustName}</td>
        <td class="list_data_ltext">${salChance.chcDesc}</td>
        <td class="list_data_text">${salChance.chcLinkman}</td>
        <td class="list_data_text">${salChance.chcTel}</td>
        <td class="list_data_text"><fmt:formatDate value="${salChance.chcCreateDate}" pattern="yyyy年MM月dd日"/> </td>
        <td class="list_data_op">
            <img onclick="to('dispatch.html');" title="指派" src="${basePath}/images/bt_linkman.gif" class="op_button" />
            <img onclick="to('edit.html');" title="编辑" src="${basePath}/images/bt_edit.gif" class="op_button" />
            <img onclick="del('“销售机会：采购笔记本电脑意向”');" title="删除" src="${basePath}/images/bt_del.gif" class="op_button" />
        </td>
    </tr>
    </c:forEach>
    <tr>
        <th colspan="7" class="pager">
            <div class="pager">
                共59条记录 每页<input value="10" size="2" />条
                第<input value="1" size="2"/>页/共5页
                <a href="javascript:to_page(1)">第一页</a>
                <a href="javascript:to_page(${pageSalChance.getPageNum()-1})">上一页</a>
                <a href="javascript:to_page(${pageSalChance.getPageNum()+1})">下一页</a>
                <a href="javascript:to_page(${pageSalChance.getPages()})">最后一页</a>
                转到<input value="1" size="2" />页
                <button width="20" onclick="reload();">GO</button>
            </div>
        </th>
    </tr>


    </tbody>
</table>
</body>
</html>
